filey=file('num.txt','r');
total=0;
while True:
    lineValue=filey.readline();
     
    if len(lineValue)==0:
         break;
    
    firstChar = lineValue[0]
    if firstChar=='#':
        continue;
    else:
        lineValueF=float(lineValue);
        total=lineValueF+total;
filey.seek(0)  
LengthL=filey.readlines();
length=len(LengthL);
print "The total is:", total;
print "The length is:",length;
#filey.close();

#file1=file('num.txt','a')
#file1.write('\n')
#file1.write('1')
#file1.close()
